package main

import (
	"bufio"
	"fmt"
	"os"

)

func main() {
	file, err := os.Open("/usr/local/go/README.md")
	if err != nil {
		fmt.Println("failed to open file")
		return
	}
	defer file.Close()

	scanner := bufio.NewScanner(file)
	for scanner.Scan() {
		fmt.Println(scanner.Text())
	}
	if err := scanner.Err(); err != nil {
		fmt.Println("read file err:", err)
	}
}